
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@page import="java.sql.*"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>Welocome TO Bank of ASV</title>
        <link href="templatemo_style.css" rel="stylesheet" type="text/css" />
    </head>
    <body>
        <%@include file="connectionvariables.jsp" %>

        <% if (((String) session.getAttribute("custid")) == null) {
                        response.sendRedirect("index.jsp");
                    }
        %>
        <div id="user" align="center" style="background-color:#A40F0F">
            <label style="color:#FFCC11">Asv Bank Welcomes</label>
            <label style="color:#ffffff" > <%=session.getAttribute("fna")%></label><br/>
            <label style="color:#FFCC11"> Current Account No: </label>
            <label style="color:#ffffff"> <%=session.getAttribute("default")%></label><br/>
            <span style="float:right;background-color:#BEC41A"><a href="logout.jsp"><label style="color:white;font-size:13px;"> LOGOUT</label></a></span>
            <span style="float:left;background-color: #BEC41A"><a href="addacc.jsp"><label style="color:white;font-size:13px;"> ADD ACCOUNT</label></a></span>
            <br/>
        </div>
        <div id="templatemo_site_title_bar_wrapper">
            <div id="templatemo_site_title_bar">
                <div id="site_title">
                    <h1><a href="#">
                            <!-- Work Template <span>free css templates</span> -->
                            <img src="images/templatemo_logo.png" alt="myWORK" />
                            <span>ASV Bank</span>

                        </a></h1>
                </div>



            </div> <!-- end of templatemo_site_title_bar -->
        </div> <!-- end of templatemo_site_title_bar_wrapper -->

        <div id="templatemo_menu_wrapper">

            <div id="templatemo_menu">
                <ul>
                    <li><a href="home.jsp" class="current">Home</a></li>
                    <li><a href="profile.jsp">Profile</a></li>
                    <li><a href="accountdet.jsp">Account Details</a></li>
                    <li><a href="enrollbillpay.jsp">Bill Payment Registration</a></li>
                    <li><a href="enrollaccount.jsp">Enroll/Un-enroll Account</a></li>
                    <li><a href="makedefault.jsp">Edit Account</a></li>
                    <li><a href="regpayee.jsp" >Register Payee</a></li>
                    <li><a href="transact.jsp" >Pay Bill</a></li>

                </ul>
            </div> <!-- end of templatemo_menu -->

        </div> <!-- end of templatemo_menu_wrapper -->



        <div id="templatemo_content">
<table cellpadding="2" cellspacing="2" border="1" align="center" width="800px">

                                       <th bgcolor="#880000" colspan="6">
                        <font size=5>Transaction Details</font>

                    </th>
                                    <tr bgcolor="#888000">
                                        <th valig="top">

                                            <label>Transaction ID</label>
                                        </th>
                                        <th valign="top">
                                            <label>Your ID</label>
                                        </th>
                                        <th valign="top">
                                            <label>Account No</label>
                                        </th>
                                        <th valign="top">
                                            <label>Transaction Date</label>
                                        </th>
                                        <th valign="top">
                                            <label>Balance</label>
                                        </th>
                                        <th valign="top">
                                            <label>Payee Account No</label>
                                        </th>



                                    </tr>
                                    <%

                                                Connection con = null;

                                                String driver = "oracle.jdbc.OracleDriver";
                                                try {
                                                    try {
                                                        Class.forName(driver);
                                                        //System.out.println("hi");
                                                        con = DriverManager.getConnection("jdbc:oracle:thin:@" + dblocal + ":1521:" + db + "", dbuser, dbpass);

                                                        Statement st = con.createStatement();


                                                        ResultSet res = st.executeQuery("select * from onbill_trans");
                                                        while (res.next()) {

                                    %>

                                    <tr>
                                        <td valign="top"">
                                            <label><%=res.getString(1)%></label>
                                        </td>
                                        <td valign="top">
                                            <label><%=res.getString(2)%></label>
                                        </td>
                                        <td valign="top" >
                                            <label><%=res.getString(3)%></label>
                                        </td>
                                        <td valign="top">
                                            <label><%=res.getString(4)%></label>
                                        </td>
                                        <td valign="top">
                                            <label><%=res.getString(5)%></label>
                                        </td>
                                        <td valign="top">
                                            <label><%=res.getInt(6)%></label>
                                        </td>

                                      </tr>

                                    <%

                                                        }

                                                    } catch (SQLException s) {
                                                        System.out.println("error in sql");
                                                    }
                                                } catch (Exception e) {
                                                    e.printStackTrace();
                                                }


                                    %>

                            </table>

        </div> <!-- end of templatemo_content -->



        <div id="templatemo_content_bottom"></div>

        <div id="templatemo_footer_wrapper">

        </div> <!-- end of footer wrapper -->
    </body>
</html>